//
//  ZNSlideView.h
//  AiShangCity
//
//  Created by 李振宁 on 9/16/15.
//  Copyright (c) 2015 LiZhenning. All rights reserved.
//

#import <UIKit/UIKit.h>


@protocol ZNSlideViewDataSource;
@protocol ZNSlideViewDelegate;

/**
 *  自动幻灯
 */

@interface ZNSlideView : UIView

@property (nonatomic , weak) id <ZNSlideViewDataSource> dataSource;

@property (nonatomic , weak) id <ZNSlideViewDelegate> delegate;

@property (nonatomic , retain) UIScrollView *scrollView;

@property (nonatomic , retain) UIPageControl *pageControl;

@property (nonatomic, retain) UILabel *labelTitle;

@property(nonatomic,strong)NSTimer *timer;

- (void)reload;

- (void)timerStart;

- (void)timerStop;

@end


@protocol ZNSlideViewDataSource <NSObject>

@required

/**
 *  幻灯片样式
 */

- (UIView *)slideView:(ZNSlideView *)slideView itemForPosition:(NSInteger)position;

/**
 *  总数
 */

- (NSInteger)countOfSlideView:(ZNSlideView *)slideView;

/**
 *  幻灯默认图片
 */
- (UIImage *)slideDefaultImage;



/**
 实现一张一张加载图片 
 */
- (NSString *)slideItemImageURLForPosition:(NSInteger)position;


/**
 实现幻灯下面文字
 */
- (NSString *)slideItemImageTitleForPosition:(NSInteger)position;

@end

@protocol ZNSlideViewDelegate <NSObject>

- (void)slideViewSelected:(NSInteger)position;

- (void)slide:(ZNSlideView *)slideView DidMoveToPosition:(NSInteger)position;

@end
